#region Copyright RenGuiYou. All rights reserved.
//=====================================================
// PandoraFrameWork
// Author:      RenGuiyou
// Feedback: 	mailto:750539605@qq.com
//=====================================================
#endregion

using System.Collections.Generic;
using UnityEngine;

public class NAtlas : MonoBehaviour {
    #region Serializable
    public Sprite[] sprites;
    public Material material;
    public Material blurMaterial;
    #endregion
    private Dictionary<string, Sprite> m_SpriteMap;
    public string AtlasName => gameObject.name;

    public void Init()
    {
        m_SpriteMap = new Dictionary<string, Sprite>();
        foreach (var sprite in sprites)
        {
            m_SpriteMap.Add(sprite.name, sprite);
        }
    }

    public Sprite GetSprite(string _name)
    {
        return m_SpriteMap[_name];
    }
}
